import Vue from 'vue'
import App from './App'
import store from './store'
import mixin from './core/mixins/app'
import uView from "uview-ui";

// #ifdef H5
import wechat from './utils/wechat.js' //引入
Vue.prototype.$wechat =wechat;
// #endif

import { showToast, showSuccess, showError } from './core/app'

Vue.prototype.$store = store

Vue.config.productionTip = false


Vue.prototype.$toast = showToast

Vue.prototype.$showSuccess = showSuccess

Vue.prototype.$showError = showError

App.mpType = 'app'
Vue.use(uView)

// #ifdef MP
// 引入uView对小程序分享的mixin封装
const mpShare = require('@/node_modules/uview-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)

import share from './utils/share.js'  //注意路径是上一步新建文件的路径
Vue.mixin(share)

// #endif

Vue.mixin(mixin)

const app = new Vue({
    store,
    ...App
})

app.$mount()
